#include <iostream>
#include <iomanip>
#include "DenseGraph.h"
#include "SparseGraph.h"
#include "ReadGraph.h"
#include "LazyPrimMST.h"

using namespace std;

int main() {

    string filename = "testG1.txt";
    int V = 8;
    SparseGraph<double> g = SparseGraph<double>(V, false);
    ReadGraph<SparseGraph<double>,double> readGraph(g,filename);

    //Test Lazy Prim MST
    cout<<"Test Lazy Prim MST:"<<endl;
    LazyPrimMST<SparseGraph<double>,double> lazyPrimMst(g);
    vector<Edge<double>> mst = lazyPrimMst.mstEdges();
    for(int i = 0;i < mst.size();i++)
        cout<<mst[i]<<endl;
    cout<<"The MST weight is : "<<lazyPrimMst.result()<<endl;
    cout<<endl;
    return 0;
}
